import request from '../request.js';


//获取聊天列表
export const getMsgList = (userId) => {
  return request({
    url: '/msg/queryChatList',
    method: 'get',
    params: { userId }
  });
};

//查找聊天记录
export const queryHistory = (senderId,receiverId) => {
  return request({
    url: '/msg/queryHistory',
    method: 'get',
    params: { senderId,receiverId }
  });
}
//保存聊天记录
  export function saveMessage(data) {
    return request({
      url: '/chat/saveMessage',
      method: 'post',
      data: data
    })
  }
